<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>测试</title>
    <script type="text/javascript" src="http://服务地址:端口/web-apps/apps/api/documents/api.js"></script>
</head>
<body>
<div id="placeholder" class = "nav"></div>
<script language="javascript" type="text/javascript">
   var config = {
        "document": {
            "fileType": "docx",
            "key": "Khirz6zTPdfd7",
            "title": "Example Document Title.docx",
            "url": "https://wdl1.file.cache.docer.com/storage/official/file/2020/08/31/f7ead601-a677-a3cc-1bf5-b4d57e71d0f5.docx"
        },
        "documentType": "text",
       "width": "1600px",
       "height": "900px",
        "editorConfig": {
            "callbackUrl": "http://回调地址:端口/docx/save",
            "lang":"zh-CN",
            "customization":{
                "forcesave":"true"
            }
        },
       "permissions": {
           "comment": true,
           "download": true,
           "edit": false, //（文件是否可以编辑，false时文件不可编辑）
           "fillForms": true,
           "print": true,
           "review": true
       }
    };

   var options = {
       "document": {
           "fileType": "xlsx",
           "key": "12NA88",
           "title": "tes88.xlsx",
           "url": "https://wdl1.file.cache.docer.com/storage/official/file/2020/09/01/0150ddd9-9a42-8152-92f7-94b5f796087a.xlsx"
       },
       "documentType": "spreadsheet",
       "width": "1600px",
       "height": "900px",
       "editorConfig": {
           "lang":"zh-CN",
           "callbackUrl": "http://192.168.10.22:9000/docx/save",
           "customization":{
               "forcesave":"true"//开启保存按钮
           }
       },
       "permissions": {
           "comment": true,
           "download": true,
           "edit": true, //（文件是否可以编辑，false时文件不可编辑）
           "fillForms": true,
           "print": true,
           "review": true
       }
   };


    new DocsAPI.DocEditor("placeholder", config);




</script>

</body>
</html>
